package com.youku.util;

import java.io.IOException;
import java.util.Properties;

import org.junit.Assert;

public class PropertyReader {

	private static final Properties pro;

	static {
		pro = new Properties();
		try {
			pro.load(PropertyReader.class.getResourceAsStream("/autotest.properties"));
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}
	
	public static String read(String key){
		String value=pro.getProperty(key);
		Assert.assertNotNull("不存在key为"+key+"的属性", value);
		return value;
	}
	
}
